package chapter6;

/**
 *  将
 *  1 2 3
 *  4 5 6
 *  7 8 9
 *  转成
 *  1 4 7
 *  2 5 8
 *  3 6 9
 * 输出
 */
public class Test6_7_4 {
    public static void main(String[] args) {
        int[][] arr = {{1,2,3},{4,5,6},{7,8,9}};
        for (int i=0;i<arr.length;i++) {
            for (int j=0; j<arr[i].length; j++) {
                System.out.print(arr[j][i] + " ");
            }
            System.out.println();
        }
    }
}
